<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>网站管理系统-后台</title>
<link rel="stylesheet" type="text/css" href="/Public/Static/css/global.css" /><link rel="stylesheet" type="text/css" href="/Public/Static/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/Public/Admin/Default/css/style.css" />
<script type="text/javascript">
  var GV = {
    JS_VERSION : '20130702',                      //js版本号(不能带空格)
    REGION_CONFIG : '',
    JS_ROOT       : './Public/Static/js/dev/',
    URL : {
      REGION : "index.php?app=home&ac=api&c=area",
      SCHOOL : "index.php?app=home&ac=api&c=school",                //学校数据
      EMOTIONS : "index.php?app=home&ac=api&c=emotions",
    },
  }
</script>
<script type="text/javascript" src="/Public/Static/js/jquery.js"></script><script type="text/javascript" src="/Public/Static/js/core.js"></script><script type="text/javascript" src="/Public/Static/js/global.js"></script><script type="text/javascript" src="/Public/Static/js/config.js"></script><script type="text/javascript" src="/Public/Static/js/common.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/Static/js/respond.src.js"></script><script type="text/javascript" src="/Public/Static/js/html5.js"></script>
<link rel="stylesheet" type="text/css" href="/Public/Static/css/bootstrap-ie78.css" />
<![endif]-->
</head>
<body>
<div class="container-fluid">

<?php if(!empty($top_nav)): ?><ul class="nav nav-tabs">
    <?php if(is_array($top_nav)): $i = 0; $__LIST__ = $top_nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['right'] == '1'): ?><span class=" pull-right" style="padding-right:5px;"><a class="btn btn-primary" href="<?php echo ($vo['url']); ?>"><?php echo ($vo['name']); ?></a> </span>
    <?php else: ?>
    <li class="<?php if(in_array(ACTION_NAME,$vo['tab'])): ?>active<?php endif; ?>"><a href="<?php echo ($vo['url']); ?>"><?php echo ($vo['name']); ?></a></li><?php endif; endforeach; endif; else: echo "" ;endif; ?>
  </ul><?php endif; ?>
<form class="form-horizontal" method="post" id="form">
  <table class="table table-striped">
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="name">导航标题：</label>
          <div class="col-md-3">
            <input type="text" class="form-control" id="name" name="name" value="<?php echo ($name); ?>" data-rule="导航标题:required" placeholder="导航标题">
          </div>
        </div>
      </td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="pid">所属上级：</label>
        <div class="col-md-3">
          <select name="pid" id="pid" class="form-control">
          <option value="0" <?php if($cid == '0'): ?>selected="selected"<?php endif; ?>>一级栏目</option>
          <?php if(is_array($nav)): $i = 0; $__LIST__ = $nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['pid'] == '0'): ?><option value="<?php echo ($vo['id']); ?>" <?php if($vo['id'] == $pid): ?>selected="selected"<?php endif; ?>><?php echo ($vo['name']); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="url">导航模块：</label>
          <div class="col-md-2">
            <input type="text" class="form-control" name="url" id="url" value="<?php echo ($url); ?>" placeholder="分组名/模块名/方法名">
          </div>
          <span class="help-block">例:Admin/Index/index </span>
        </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="data">参数：</label>
          <div class="col-md-3"> <input type="text" class="form-control" name="data" id="data" value="<?php echo ($data); ?>" placeholder="链接参数"></div>
          <span class="help-block">例:groupid=1&type=2 </span>
        </div></td>
    </tr>
    <tr>
      <td>
        <div class="form-group">
          <label class="col-sm-2 control-label" for="remark">备注：</label>
          <div class="col-md-5">
            <textarea name="remark" style="width:500px; height:80px; resize:none;" id="remark" class="form-control"><?php echo ($remark); ?></textarea>
          </div>
        </div>
      </td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="sort">排序：</label>
        <div class="col-md-1">
          <input type="text" class="form-control" name="sort" id="sort" value="<?php echo ($sort); ?>" placeholder="链接排序">
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="status">状态：</label>
        <div class="col-md-2">
          <select name="status" id="status" class="form-control">
            <option value="1" <?php if($status == '1'): ?>selected="selected"<?php endif; ?>>开启</option>
            <option value="0" <?php if($status == '0'): ?>selected="selected"<?php endif; ?>>禁用</option>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="form-group">
          <label class="col-sm-2 control-label" for="type">类型：</label>
        <div class="col-md-2">
          <select name="type" id="type" class="form-control">
            <option value="admin" <?php if($type == 'admin'): ?>selected="selected"<?php endif; ?>>后台菜单</option>
            <option value="fornt" <?php if($type == 'fornt'): ?>selected="selected"<?php endif; ?>>会员菜单</option>
          </select>
        </div> </div></td>
    </tr>
    <tr>
      <td><div class="col-sm-offset-2 col-md-5">
          <input type="submit" class="btn btn-default" name="submit" value="确认提交">
        </div></td>
    </tr>
  </table>
</form>
<div class="clear"></div>
<script>
$(function(){
	var v = $("#form").validate({
		rules:{
			"name":"required",
			"url":"required"
		},
		success: function (lable){
			lable.ligerHideTip();
			lable.remove();
		}
	});

});
</script> 
	<div class="foot">
		<p>2013 &copy; <a href="http://www.86qu.cn" target="_blank">86区</a> by <a href="#" target="_blank">86区.</a> </p>
	</div>
</div>
</body>
</html>